-- GENERATED SPELL FOR [Murkblood Putrifier] --


function spell0_18202(pUnit, Event) --@Corrupted Earth,n/a--
pUnit:FullCastSpellOnTarget(32133,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18202', 3329, 1)
end

function spell1_18202(pUnit, Event) --@Putrid Cloud,n/a--
pUnit:FullCastSpellOnTarget(32087,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18202', 635, 1)
end

function spell2_18202(pUnit, Event) --@Putrid Cloud,n/a--
pUnit:FullCastSpellOnTarget(32134,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18202', 15000, 1)
end

function spell3_18202(pUnit, Event) --@Tainted Chain Lightning,n/a--
pUnit:FullCastSpellOnTarget(32132,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18202', 10000, 1)
end

function Sorts_18202(pUnit, Event)
local choix_sorts_18202 = math.random(0, 3)
if choix_sorts_18202 == 0 then
pUnit:RegisterEvent('spell0_18202', 1, 1)
end
if choix_sorts_18202 == 1 then
pUnit:RegisterEvent('spell1_18202', 1, 1)
end
if choix_sorts_18202 == 2 then
pUnit:RegisterEvent('spell2_18202', 1, 1)
end
if choix_sorts_18202 == 3 then
pUnit:RegisterEvent('spell3_18202', 1, 1)
end
end

function mob18202_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_18202', math.random(1500, 3000), 1)
end

function mob18202_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18202_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18202_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(18202, 1, 'mob18202_Action')
RegisterUnitEvent(18202, 2, 'mob18202_Leave')
RegisterUnitEvent(18202, 3, 'mob18202_Kill')
RegisterUnitEvent(18202, 4, 'mob18202_Die')
